﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Speech.Recognition;

namespace LCARSLibrary.VerbalInterface
{
    public class VIGrammarGroup
    {
        public int ID { get; set; }
        public List<Grammar> Grammars { get; set; }
        public object Tag { get; set; }

        public event EventHandler<RecognizingCommandArgs> CommandRecognizing;
        public event EventHandler<RecognizedCommandArgs> CommandRecognized;
        public event EventHandler<RejectedCommandArgs> CommandRejected;


        internal virtual void OnCommandRecognizing(object sender, RecognizingCommandArgs e)
        {
            EventHandler<RecognizingCommandArgs> temp = CommandRecognizing;
            if (temp != null)
            {
                temp(sender, e);
            }
        }

        internal virtual void OnCommandRecognized(object sender, RecognizedCommandArgs e)
        {
            EventHandler<RecognizedCommandArgs> temp = CommandRecognized;
            if (temp != null)
            {
                temp(sender, e);
            }
        }

        internal virtual void OnCommandRejected(object sender, RejectedCommandArgs e)
        {
            EventHandler<RejectedCommandArgs> temp = CommandRejected;
            if (temp != null)
            {
                temp(sender, e);
            }
        }
    }
}
